﻿@inject IStringLocalizer<QRCodes> Localizer

<QRCode OnGenerated="OnGenerated" OnCleared="OnCleared" ShowButtons="true"></QRCode>
<ConsoleLogger @ref="Logger" class="mt-3" />

@code {
    [NotNull]
    private ConsoleLogger? Logger { get; set; }

    private Task OnGenerated()
    {
        Logger.Log(Localizer["SuccessText"]);
        return Task.CompletedTask;
    }

    private Task OnCleared()
    {
        Logger.Log(Localizer["ClearText"]);
        return Task.CompletedTask;
    }
}
